#include "header/trace.h"

uint8_t trace_number = 0;
uint8_t trace_array[TRACE_ARRAY_SIZE];
uint16_t trace_counter = 0;
extern EVENT* print_event;

void print_trace()
{
	int i =0;

	for (i=0; i<TRACE_ARRAY_SIZE; i++) {
			uart_putchar(trace_array[i]);
	}
}

void add_to_trace(uint8_t number)
{
	if (trace_counter < TRACE_ARRAY_SIZE) {
		trace_array[trace_counter] = number+48;
		trace_counter++;
	}
	else {
		Event_Signal(print_event);
	}
}
